\ProvidesPackage{fig_interest}

\RequirePackage{tikz}
\RequirePackage{pgfplots}

\newcommand{\drawID}{

    \begin{axis}[
        width = 12cm,
        height = 6cm,
        axis lines = middle,
        xlabel = {$D$},
        ylabel = {$I(D)$},
        xmin = -0.3, xmax = 13.3,
        ymin = -0.8, ymax = 1.3,
        xtick = {0}, ytick = {1},
    ]

    \addplot[
        domain = 0:12,
        samples = 200,
        thick,
        red
    ]{e/9*exp(-x^2/9)*x*x};
    \addlegendentry{$I(D)$};

    \addplot[
        domain = 0:12,
        samples = 200,
        blue
    ]{e/9*exp(-x^2/9)*(-2/9*(x^3)+2*x)};
    \addlegendentry{$I'(D)$};

    \node at (axis cs:2.9, 0) [anchor=north] {$\mu$};
    \draw[thin, dotted] (axis cs:3, 0) -- (axis cs:3, 1) -- (axis cs:0, 1);

    \node at (axis cs:1.4, 0) [anchor=north] {$\alpha$};
    \draw[thin, dotted] (axis cs:1.4, 0) -- (axis cs:1.4, 0.53);

    \node at (axis cs:4.53, 0.3) [anchor=north] {$\beta$};
    \draw[thin, dotted] (axis cs:4.53, 0) -- (axis cs:4.53, -0.36);


    \end{axis}
}